project( main )
CMAKE_MINIMUM_REQUIRED(VERSION 3.0)
#find_package( OpenCV REQUIRED )

set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/build)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/build)
#set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)

FIND_PACKAGE(OpenCV REQUIRED)
if(OpenCV_FOUND)
    include_directories(${OpenCV_INCLUDE_DIRS})
    link_directories(${OpenCV_LIBRARY_DIRS})
endif()

AUX_SOURCE_DIRECTORY(src DIR_SRCS)
ADD_EXECUTABLE(main ${DIR_SRCS})
target_link_libraries( main ${OpenCV_LIBS} )
